*PUBLIC DOMAIN SOFTWARE TO ACCESS THE SYSTEM DATE ON THE APC
* DATE IS STORED IN SYSTEM FUNCTION 'DATE()'
* BY JACK BURKE, DALLAS,TX
* MODIFIED BY JEFF JOY, NECIS
* The 'SET' paramaters were added by R.P.Brady
* 
SET TALK OFF
SET BELL ON
SET ESCAPE ON
SET INTENSITY ON
SET DEFA TO B
*
* The date routine begins on next line.
STORE '                                           'TO DUMMY
POKE 61440,82,81,177,0,186,16,240,205,220,89,90,195
SET CALL TO 61440
CALL DUMMY
STORE PEEK (61456) TO C1
STORE PEEK (61457) TO C2
STORE PEEK (61458) TO C3
STORE C1/16.0000 TO Y1
STORE (Y1-INT(Y1))*16 TO Y2
* THIS CREATES A YEAR STRING
STORE STR((INT(Y1)*10)+INT(Y2),2) TO YR
* THIS CREATES A MONTH STRING
IF C2/16.0000 < 10
  STORE '0'+STR(C2/16.0000,1) TO MO
ELSE
STORE STR(C2/16.0000,2) TO MO
ENDIF
* THIS CREATES A DATE STRING
STORE C3/16.0000 TO D1
STORE (D1-INT(D1))*16 TO D2
STORE (INT(D1)*10)+INT(D2) TO DA
IF INT(D1)=0
STORE "0"+STR(INT(D2),1) TO DT
ELSE
STORE STR(DA,2) TO DT
ENDIF
STORE (MO+'/'+DT+'/'+YR) TO DT
SET DATE TO &DT
? "THE SYSTEM DATE IS SET TO: ",DATE()
RELEASE ALL
SET TALK ON
RETURN